package com.deng.eventflow.core.functions;

import com.deng.eventflow.core.Processor;
import com.deng.eventflow.core.SynchronousProcessor;

import java.util.LinkedList;

public abstract class AbstractWindow extends SynchronousProcessor {
    /**
     * The event windows
     */
    protected LinkedList<Object>[] m_window;

    /**
     * The window's width
     */
    protected int m_width;

    /**
     * The internal processor
     */
    protected Processor m_processor = null;

    /**
     * Creates a new abstract window processor
     * @param in_processor The processor to run on each window
     * @param width The width of the window
     */
    public AbstractWindow(Processor in_processor, int width)
    {
        super(in_processor.getInputArity(), in_processor.getOutputArity());
        m_width = width;
        m_processor = in_processor;
    }
}
